﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YmSoft.Kblog.Utility
{
    public class CSharpKeyWordHighLight
    {
        public CSharpKeyWordHighLight()
        {

        }
        public string CSharpColor(string csharp)
        {
            string[] keywords = { "using", "public", "class", "string", "return", "new", "namespace", "static", "int", "if" };
            string[] keywordColor = { "green", "blue", "red", "blue", "blue", "green", "green", "blue", "red", "blue" };
            for (int i = 0; i < keywords.Length; i++)
            {
                csharp = csharp.Replace(keywords[i], "<font color='" + keywordColor[i] + "'>" + keywords[i] + "</font>");
            }
            return csharp;
        }
    }
}